fix(schematic): honor ignored power pins - #280
Closed
nordic-style wants to merge 2 commits into
Closed
Conversation
Schematic validators, exports, connectivity queries, and design-review audits transformed every library pin through each matching reference's first placement. Multi-unit parts therefore reported phantom pins, wrong nets, false audit findings, and unsafe connectivity snaps. Resolve only the selected unit at every per-instance call site, search all placed units for reference-level queries, identify units in additive response fields, and remove the temporary partial-review diagnostic. Regression fixtures place both units' pins at the same local coordinate so first-instance resolution cannot pass unnoticed. Refs mixelpixx#182
Preserve each library pin's KiCad electrical type and let the connection validator skip only power_in and power_out pins when requested, with explicit coverage in the result. Refs mixelpixx#251
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User-visible problem and scope
validate_component_connections(ignore_power_pins: true)advertised that power pins would be ignored, but the handler never read the flag. Designs could therefore report unwanted unconnected-power findings even when the caller explicitly excluded them.This PR parses KiCad library pin electrical types and omits only
power_inandpower_outpins when requested.Refs #251
Depends on #272, which makes placed-unit pin resolution correct for multi-unit symbols. Once #272 merges, this PR reduces to one focused follow-up commit.
Root cause and design
The validator had pin coordinates and numbers but not the library electrical type, so the schema value was inert.
LibPinnow carries the parsed KiCad type. Validation applies the option after resolving the actual placed unit, reports how many power pins were ignored, and leaves all non-power pins under the existing rules.Compatibility and migration
The public field and its default remain unchanged.
falsepreserves existing behavior.truenow implements the documented behavior; no schematic is modified.Validation
KONNECT_STATE_DIR=/private/tmp/konnect-power-pins cargo test -p konnect-core power_pin_validation_tests --lockedcargo clippy --workspace --locked --all-targets -- -D warningscargo fmt --all -- --checkkonnect-coretests pass, with only the same three installed-Device:Rfixture-shadowing failures reproduced on unmodifiedmain.Risk and rollback
Risk is limited to classification of KiCad's
power_in/power_outpin tokens. Unknown types remain validated rather than being skipped. Rollback is one commit after #272.